// 支付状态枚举
export type PaymentStatus = 'PENDING' | 'PAID' | 'REFUNDED' | 'CANCELLED'

// 退款状态
export type RefundStatus = 'PENDING' | 'APPROVED' | 'REJECTED'

// 分配状态
export type DistributionStatus = 'PENDING' | 'COMPLETED'

// 支付查询参数
export interface PaymentQuery {
  pageNum: number
  pageSize: number
  orderNo?: string
  status?: PaymentStatus
  refundStatus?: RefundStatus
  startDate?: string
  endDate?: string
  counselorName?: string
}

// 支付方式
export type PaymentMethod = 'ALIPAY' | 'WECHAT'

// 支付记录类型
export interface PaymentRecord {
  orderNo: string
  totalAmount: number
  paymentStatus: PaymentStatus
  paymentMethod: PaymentMethod
  createTime: string
  paymentTime?: string
  refundStatus?: string
}

// 退款表单
export interface RefundForm {
  orderNo: string
  amount: number
  reasonType: string
  reason: string
  phone: string
}

// 退款审核表单
export interface RefundApproveForm {
  orderNo: string
  approved: boolean
  remark: string
}

// 支付统计数据
export interface PaymentStats {
  totalAmount: number
  monthlyAmount: number
  monthlyGrowth: number
  paymentTrends: Array<{
    date: string
    amount: number
  }>
  paymentDistribution: Array<{
    status: PaymentStatus
    count: number
  }>
}

// 支付信息接口
export interface PaymentInfo {
  orderNo: string
  amount: number
  status: PaymentStatus
  paymentUrl?: string
}

// 分页查询参数
export interface PaymentQueryParams {
  pageNum: number
  pageSize: number
  orderNo?: string
  paymentStatus?: PaymentStatus
  startDate?: string
  endDate?: string
}

// 分页结果
export interface PageResult<T> {
  records: T[]
  total: number
  pages: number
  current: number
  size: number
}

